package com.talos.ums.api.user.dto;


import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 用户表
 * </p>
 * @author _
 * @since 2023-01-10
 */

@Schema(description="用户表")
@Data
@EqualsAndHashCode(callSuper = false)
public class UmsUserApiDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description  = "自增id")
    @JsonFormat(shape=JsonFormat.Shape.STRING)
    private Long id;

    @Schema(description  = "用户账号")
    private String userName;

    @Schema(description  = "用户名称")
    private String nickName;

    @Schema(description  = "手机号")
    private String phone;

    @Schema(description  = "邮箱地址")
    private String mailAddress;

    @Schema(description  = "性别: 0-女 1-男")
    private Integer gender;

    @Schema(description  = "头像url")
    private String headImgUrl;

    @Schema(description  = "用户类型：0-企业级，1-复合级，2-多仓级，3-单仓级")
    private Integer userType;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description  = "失效日期")
    private Date expirationDate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description  = "密码过期时间")
    private Date passwordExpirationDate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description  = "锁定时间")
    private Date lockDate;

    @Schema(description  = "岗位线: 1-一线, 2-二线, 3-三线")
    private Integer jobLine;

    @Schema(description  = "登录次数")
    private Integer loginTimes;

    @Schema(description  = "是否新用户: 0-否,1-是")
    private Integer newAccountFlag;

    @Schema(description  = "租户编码")
    private String tenantCode;

    @Schema(description  = "其他信息")
    private String remark;

    @Schema(description  = "是否有效：0-无效，1-有效")
    private Integer activeFlag;

    @Schema(description  = "语言类型，默认中文")
    private String language;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description  = "创建时间")
    private Date createTime;

    @Schema(description  = "创建人工号")
    private String creatorCode;

    @Schema(description  = "创建人姓名")
    private String creatorName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description  = "修改时间")
    private Date modifyTime;

    @Schema(description  = "修改人工号")
    private String modifierCode;

    @Schema(description  = "修改人姓名")
    private String modifierName;

    @Schema(description  = "用户登录系统标识")
    private String passUid;

    @Schema(description  = "是否需要修改密码 0-否 1-是")
    private Integer needModifyPassword;

    @Schema(description  = "无效时的id")
    private Long repeatUserId;

    private String source;

    @Schema(description  = "账户类型：0-企业内部账号，1-货主主账号，2-货主子账号")
    private Integer accountType;

    @Schema(description  = "货主编码")
    private String companyCode;

    @Schema(description  = "工号")
    private String jobNumber;

    @Schema(description ="删除标识：1正常  2删除")
    private Integer deleted;

    @Schema(description ="所属组织")
    private List<String> organizationIds;

    @Schema(description ="角色Id集")
    @JsonFormat(
            shape = JsonFormat.Shape.STRING
    )
    private List<String> roleIds = new ArrayList();

    @Schema(description ="货主ID集合")
    @JsonFormat(
            shape = JsonFormat.Shape.STRING
    )
    private List<String> companyIds = new ArrayList();

    @Schema(description ="仓库ID集合")
    private List<String> warehouseIds = new ArrayList();

    @Schema(description  = "获得所有角色权限标识，1是，2否")
    private Integer allRole;

    @Schema(description  = "获得所有仓库标识，1是，2否")
    private Integer allWarehouse;

    @Schema(description  = "获得所有货主标识，1是，2否")
    private Integer allCompany;

    @Schema(description  = "获得所有组织标识，1是，2否")
    private Integer allOrganization;

    @Schema(description  = "是否admin用户 1是 2否")
    private Integer toAdmin;

    @Schema(description ="是否拥有所有站点权限，1是，2否")
    private Integer allStation;


}

